package com.hbnu.service.impl;

import com.hbnu.dao.DormManagerDao;
import com.hbnu.dao.impl.DormManagerDaoImpl;
import com.hbnu.pojo.DormBuild;
import com.hbnu.service.DormManagerService;

import java.util.List;

/**
 * @author chendikai
 * @date 2024-11-13 下午 3:15
 */
public class DormManagerServiceImpl implements DormManagerService {

    DormManagerDao dormManagerDao=new DormManagerDaoImpl();

    @Override
    public List<DormBuild> findAll() {
        return dormManagerDao.findAll();
    }

    @Override
    public List<DormBuild> find() {
        return dormManagerDao.find();
    }

    @Override
    public void deleteByUserId(Integer id) {
        dormManagerDao.deleteByUserId(id);
    }

    @Override
    public void saveManagerAndBuild(Integer id, String[] dormBuildIds) {
        dormManagerDao.saveManagerAndBuild(id,dormBuildIds);
    }

    @Override
    public List<DormBuild> findByUserId(Integer id) {
        return dormManagerDao.findByUserId(id);
    }

    @Override
    public DormBuild findById(int id) {
        return dormManagerDao.findById(id);
    }

    @Override
    public DormBuild findByName(String name) {
        return dormManagerDao.findByName(name);
    }

    @Override
    public void update(DormBuild dormBuild) {
        dormManagerDao.update(dormBuild);
    }

    @Override
    public void save(DormBuild build) {
        dormManagerDao.save(build);
    }
}
